programming4us
           
 
 
Applications Server

BizTalk Server 2009 : Using asynchronous services in WCF (part 1) - Creating the synchronous service

- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019
12/14/2010 4:44:44 PM
WCF has support for both client-side and server-side asynchronous programming scenarios. By "client-side" programming, I mean that a service built with a request/response operation can appear asynchronous to the client. For example, let's look at a simple sequence diagram that shows what I mean.

The WCF client proxy class is responsible for simulating the asynchronous communication, while the actual service still exposes only a synchronous operation. Let's look at an example of how we would physically create a client-side asynchronous experience in a WCF solution.

Creating the synchronous service

We start out by creating a new, empty Visual Studio.NET 2008 solution. Then we add a project of type WCF Service Library to the solution. This project type automatically adds an interface class, service class, and application configuration file. I've changed the interface class content so that it reflects the adverse event object that we'll be working with throughout this chapter. An adverse event is a patient experience with a drug that has caused them problems. My service interface (and corresponding data classes) now looks like this:

[ServiceContract(Namespace="http://Seroter.BizTalkSOA.Chapter6")]
public interface IAdverseEventSync
{
[OperationContract]
AdverseEventAction SubmitAdverseEvent(AdverseEvent NewAE);

}
[DataContract(Namespace="http://Seroter.BizTalkSOA.Chapter6")]
public class AdverseEvent
{
[DataMember]
public string Product { get; set; }
[DataMember]
public int PatientID { get; set; }
[DataMember]
public int PhysicianID { get; set; }
[DataMember]
public AECategoryType Category { get; set; }
[DataMember]
public DateTime DateStarted { get; set; }
[DataMember]
public ReportedByType ReportedBy { get; set; }
[DataMember]
public string Description { get; set; }
}
[DataContract(Namespace="http://Seroter.BizTalkSOA.Chapter6")]
asynchronous communicationusing, in WCFpublic class AdverseEventAction
asynchronous services, WCFsynchronous service, creating{
[DataMember]
public string SubmissionID { get; set; }
[DataMember]
public string Product { get; set; }
[DataMember]
public int PatientID { get; set; }
[DataMember]
public bool doCeaseMedication { get; set; }
[DataMember]
public bool doReduceDosage { get; set; }
[DataMember]
public bool doAdmitHospital { get; set; }
[DataMember]
public bool doScheduleFollowup { get; set; }
[DataMember]
WCFasynchronous services, usingpublic string AdditionalNotes { get; set; }
}
[DataContract]
public enum AECategoryType
{
[EnumMember]
InjectionSoreness = 0,
[EnumMember]
Swelling = 1,
[EnumMember]
Headache = 2,
[EnumMember]
Bleeding = 3,
[EnumMember]
Sickness = 4,
[EnumMember]
Rash = 5,
[EnumMember]
Other = 6
}
[DataContract]
public enum ReportedByType
{
[EnumMember]
Patient = 0,
[EnumMember]
Physician = 1,
[EnumMember]
SalesRep = 2,
[EnumMember]
Other = 3
}
Other -----------------
- Exchange Server 2010 : Troubleshooting Federated Delegation (part 3) - Troubleshooting Calendar and Contacts Sharing
- Exchange Server 2010 : Troubleshooting Federated Delegation (part 2) - Troubleshooting Organization Relationships
- Exchange Server 2010 : Troubleshooting Federated Delegation (part 1) - Troubleshooting the Federation Trust
- Exchange Server 2010 : Federation Scenarios (part 3) - Federating with Online Services
- Exchange Server 2010 : Federation Scenarios (part 2) - Calendar and Contacts Sharing
- Exchange Server 2010 : Federation Scenarios (part 1) - Free/Busy Access
- Active Directory Domain Services 2008: View Settings Defined in Password Settings Objects
- Active Directory Domain Services 2008: Delete Password Settings Objects
- Active Directory Domain Services 2008: Create Password Settings Objects
- Exchange Server 2010 : Fundamentals and Components of Federated Delegation (part 4)
- Exchange Server 2010 : Fundamentals and Components of Federated Delegation (part 3) - Organization Relationships
- Exchange Server 2010 : Fundamentals and Components of Federated Delegation (part 2)
- Exchange Server 2010 : Fundamentals and Components of Federated Delegation (part 1)
- Introduction to Federated Delegation in Exchange Server 2010
- BizTalk Server 2009 : Service-oriented endpoint patterns (part 2)
- BizTalk Server 2009 : Service-oriented endpoint patterns (part 1)
- Exchange Server 2010 : Office Communication Server 2007 R2 Integration (part 3) - Deploying Instant Messaging for OWA
- Exchange Server 2010 : Office Communication Server 2007 R2 Integration (part 2) - Deploying UM and OCS 2007 R2 Integration
- Exchange Server 2010 : Office Communication Server 2007 R2 Integration (part 1) - Integrating OCS 2007 R2 in Exchange 2010 Architecture
- Exchange Server 2010 : Managing Unified Messaging (part 1) - Testing Unified Messaging Functionality
 
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
- First look: Apple Watch

- 3 Tips for Maintaining Your Cell Phone Battery (part 1)

- 3 Tips for Maintaining Your Cell Phone Battery (part 2)
programming4us programming4us